<?php
/**
 * Created by PhpStorm.
 * User: xiao
 * Date: 2018/3/20
 * Time: 9:30
 */

namespace Common\Utils;


class CommonUtils
{
    public static function object2array($object)
    {
        if (is_object($object)) {
            dump(1);
            foreach ($object as $key => $value) {
                $array[$key] = $value;
            }
        } else {
            $array = $object;
        }
        return $array;
    }
}